home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-03-28 | 2.0 KB | 79 lines |
- # Copyright 1992 by Nik A Gervae. This is the makefile for client, using
- # the socket classes, both of which are licensed under the terms of the GNU
- # General Public License as published by the Free Software Foundation.
- #
- # The program and this makefile are distributed in the hope that it will
- # be useful, but are provided "AS IS" AND WITHOUT ANY WARRANTY; without any
- # express or implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- # PURPOSE. See the GNU General Public License for more details. Any use or
- # distribution of the program and documentation must include appropriate
- # copyrights to acknowledge Nik A. Gervae and the Free Software Foundation,
- # Inc.
- #
- # You should have received a copy of the GNU General Public License
- # along with this documentation; if not, write to the Free Software
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- #
- # ===============
-
- NAME = client
-
- SHELL=/bin/sh
- CC = cc
- OSVERS = NS2
-
- ##
-
- KIT = ..
- VPATH = $(KIT)
-
- CFLAGS = -g -DDEBUG -I$(KIT) -D$(OSVERS)
-
- CLASSES = SktSocket.m SktSocketUser.m
- MFILES = client.m
- CFILES = util.c
- SOURCEFILES = $(CLASSES) $(MFILES) $(CFILES)
-
- OFILES = $(CLASSES:.m=.o) $(MFILES:.m=.o) $(CFILES:.c=.o)
- PRODUCT_DEPENDS = $(OFILES)
- DEPENDS = Make.depends
-
- TRASH = *.o $(DEPENDS)
-
- ##
- ## Keyword dependencies & actions.
-
- default::
- @test -f $(DEPENDS) || $(MAKE) depend
- $(MAKE) $(NAME) "CFLAGS = $(CFLAGS)"
-
- clean::
- -/bin/rm -rf $(TRASH)
-
- reallyclean::
- -/bin/rm -rf $(TRASH) "$(NAME)"
-
- ##
- ## Files dependencies & actions.
-
- $(NAME): $(PRODUCT_DEPENDS)
- $(CC) $(CFLAGS) $(PRODUCT_DEPENDS) -o "$(NAME)"
-
- .m.o:
- $(CC) $(CFLAGS) $(OBJCFLAGS) -c $*.m -o $*.o
-
- $(DEPENDS) depend:: $(SOURCEFILES)
- @echo 'Finding dependency information....'
- @/bin/rm -f $(DEPENDS)
- @$(CC) -M $(CFLAGS) $(SOURCEFILES) | \
- awk '{ if ($$1 != prev) { if (rec != "") print rec; \
- rec = $$0; prev = $$1; } \
- else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
- else rec = rec " " $$2 } } \
- END { print rec }' > $(DEPENDS)
-
- -include $(DEPENDS)
-
- ##
- ## END OF MAKEFILE.
-